//
//  WDJWorldDayController.m
//  wdj
//
//  Created by 蓝鳍互娱 on 2024/7/8.
//

#import "WDJWorldDayController.h"

@interface WDJWorldDayController ()
@property (nonatomic,strong) UILabel *worldDayZhLab;
@property (nonatomic,strong) UILabel *worldDayEnLab;
@property (nonatomic,strong) NSArray *worldDays;
@end

@implementation WDJWorldDayController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBar.hidden = true;
    [self wdjCreatView];
    [self worldDayData];
}
- (void)wdjCreatView{
    UIImageView * worldDayBgImgView = [[UIImageView alloc] init];
    worldDayBgImgView.image = [WDjWholeData wholeImageNamed:@"wdj_WorldDayBg"];
    worldDayBgImgView.userInteractionEnabled = true;
    [self.view addSubview:worldDayBgImgView];
    [worldDayBgImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(@(0));
    }];
    UIImageView * worldDayCenterImgView = [[UIImageView alloc] init];
    worldDayCenterImgView.image = [WDjWholeData wholeImageNamed:@"wdj_WorldDayCenterBg"];
    worldDayCenterImgView.userInteractionEnabled = true;
    [self.view addSubview:worldDayCenterImgView];
    [worldDayCenterImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@([WDjWholeData wholeScreewRatio:18]));
        make.right.equalTo(@(-[WDjWholeData wholeScreewRatio:18]));
        make.bottom.equalTo(@(-[WDjWholeData wholeScreewRatio:58]));
        make.top.equalTo(@([WDjWholeData wholeScreewRatio:104]+[WDjWholeData wholeTopSafeH]));
    }];
    UIButton * worldDayNavBackBtn = [[UIButton alloc] init];
    [worldDayNavBackBtn setBackgroundImage:[WDjWholeData wholeImageNamed:@"wdj_NavBack"] forState:UIControlStateNormal];
    [worldDayNavBackBtn addTarget:self action:@selector(worldDayNavBack) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:worldDayNavBackBtn];
    [worldDayNavBackBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@([WDjWholeData wholeScreewRatio:24]));
        make.height.equalTo(@([WDjWholeData wholeScreewRatio:64]));
        make.width.equalTo(@([WDjWholeData wholeScreewRatio:64]));
        make.top.equalTo(@([WDjWholeData wholeScreewRatio:12]+[WDjWholeData wholeTopSafeH]));
    }];
    self.worldDayZhLab = [[UILabel alloc] init];
    self.worldDayZhLab.font = [UIFont systemFontOfSize:[WDjWholeData wholeScreewRatio:34] weight:UIFontWeightMedium];
    self.worldDayZhLab.textColor = [WDjWholeData wholeColorHexString:@"#FFFFFF"];
    self.worldDayZhLab.numberOfLines = 0;
    [worldDayCenterImgView addSubview:self.worldDayZhLab];
    [self.worldDayZhLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@([WDjWholeData wholeScreewRatio:86]));
        make.right.equalTo(@(-[WDjWholeData wholeScreewRatio:86]));
        make.top.equalTo(@([WDjWholeData wholeScreewRatio:316]));
    }];
    self.worldDayEnLab = [[UILabel alloc] init];
    self.worldDayEnLab.font = [UIFont systemFontOfSize:[WDjWholeData wholeScreewRatio:26] weight:UIFontWeightRegular];
    self.worldDayEnLab.textColor = [WDjWholeData wholeColorHexString:@"#4D5B76"];
    self.worldDayEnLab.numberOfLines = 0;
    [worldDayCenterImgView addSubview:self.worldDayEnLab];
    [self.worldDayEnLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@([WDjWholeData wholeScreewRatio:86]));
        make.right.equalTo(@(-[WDjWholeData wholeScreewRatio:86]));
        make.top.equalTo(self.worldDayZhLab.mas_bottom).offset([WDjWholeData wholeScreewRatio:16]);
    }];
}
- (void)worldDayData{
    NSDictionary * worldDayTitleDic = [[NSUserDefaults standardUserDefaults] objectForKey:@"worldDayTitle"];
    self.worldDayZhLab.text = [worldDayTitleDic objectForKey:@"zhTitle"];
    self.worldDayEnLab.text = [worldDayTitleDic objectForKey:@"enTitle"];
}
- (void)worldDayNavBack{
    [self.navigationController popViewControllerAnimated:true];
}
@end
